# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libnfs
pkgver=4.0.0
pkgrel=0
pkgdesc="Client library for accessing NFS shares"
url="https://github.com/sahlberg/libnfs"
arch="all"
options="!check"  # No test suite.
license="LGPL-2.1-or-later"
makedepends="autoconf automake m4 libtool"
subpackages="$pkgname-dev $pkgname-doc"
source="https://github.com/sahlberg/libnfs/archive/libnfs-$pkgver.tar.gz
	fix-includes.patch"

builddir="$srcdir"/libnfs-libnfs-$pkgver

prepare() {
	default_prepare
	./bootstrap
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var
	make
}

package() {
	make DESTDIR="$pkgdir" install
	rm -f "$pkgdir"/usr/lib/*.a
}

sha512sums="3d93d83d1909f24de304c0d47fa6240da7ecf43ce2488a242a58ddabe51d774caf813f5a90ae720a8edd251a765b30e88c0e5b6a13ecb254dfecdc98e30737fa  libnfs-4.0.0.tar.gz
14219122c6decf7e0e292a2962a7dbf9b2e408b87d8e22cf1761b742834e817652f3e4919dded00f645ccf79e035e03712e7072ec1cb23bfd24ad012e9183824  fix-includes.patch"
